<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>

<script>
let p2 = {
    //在外面添加属性用 = 即可
    name:"李四",
    age:20,
    run:function (){
        console.log(this.name + ":" + this.age)
    }
}
p2.run()
</script>
</html>